s1_generate_a_series_of_files(){
for((i=1;i<=100;i++));do
echo $i > /tmp/new_file$i
done
}

s2_list_4_files_in_long_format_about_account_and_group(){
ls -1 /etc/{passwd,froup,shadow,gshadow} | sort
}


s3_find_items_related_to_given_username(){
local username=$1
grep "^$groupname:" /etc/passwd/etc/shadow |sort
}

s4_find_items_related_to_group_name(){
lolcal froupname=$1
grep "^groupname:" /etc/group /etc/gshadow |sort
}

s5_create_groups_for_given_group_names(){
for group in "rnd" "itoperation";do
groupadd $group
done
}

s6_create_user_and_set_their_group_as_required(){
local users=("Adam" "Bob" "Calvin" "David" "Edward")
for user in "${user[@]}";do
useradd -m $user
done
usermod -aG rnd Adam Bob Edward
usermod -aG itoperation Calvin David
}

s7_change_user_shell(){
for user in "Adam" "Edward";do
cash -s /user/bin/sh $user
done
}


s8_set_password_change_policy(){
passwd -n 10 -x60 -w 10 adam
passwd -n 10 -x60 -w 10 bob
passwd -n 10 -x60 -w 10 david
passwd -n 10 -x60 -w 10 calvin
paaswd -n 10 -x60 -w 10 edward
}
s9_set_password_for_five_user(){
local passwords=("$1" "$2" "$3" "s4" "$5")
local usernames=("Adam" "Bob" "Calvin" "David" "Edward")
for ((i=0; i<${#usernames[@]};i++));do
echo "${usernames[@]}:${passwords[$i]}" | chpasswd
done
}

s10_lock_bobs_password(){
passwd -l Bob
}


s11_include_adam_into_wheel_group() {
usermod -aG wheel Adam
}

s12_change_files_permission(){
for((i=3;i<=100;i+=3));do
chmod 640 /tmp/new_files$i
done
}

